<?php

namespace App\Http\Controllers\Baidu;

use Illuminate\Http\Request;
use	Exception;

include_once ('../app/libary/Baidu/sms_service_CampaignService.php');

use sms_service_CampaignService;
use GetCampaignRequest;
use GetCampaignResponse;


class CampaignController
{

    var $campaign;
    var $getCampaignRequest;

    public function __construct()
    {
        $this->campaign = new sms_service_CampaignService();
        $this->getCampaignRequest = new GetCampaignRequest();
    }



    /**
     *获取推广计划的详情
     */
    public function getCampaign()
    {


        $data = [
            "campaignId","regionTarget","budgetOfflineTime",'device',
            'campaignType','exactNegativeWords','isDynamicCreative',
            'isDynamicTagSublink','isDynamicTitle','isDynamicHotRedirect',
            'regionTarget','negativeWords','pause'
        ];
        $this->getCampaignRequest->setCampaignFields($data);
        $data = $this->campaign->getCampaign($this->getCampaignRequest);

        return json_encode($data);

    }




}


